﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
namespace BUS
{
    public class BanBUS
    {
        //lay danh sach ban
        public List<BanDTO> dsban()
        {
            BanDAO ds = new BanDAO();
            List<BanDTO> kq = ds.dsban();
            return kq;
        }
        //lay danh sach ban theo trang thai
        public List<BanDTO> laydanhsachbantheotrangthai(string trangthai)
        {
            BanDAO ds = new BanDAO();
            List<BanDTO> kq = ds.laydanhsachbantheotrangthai(trangthai);
            return kq;
        }

        public List<BanDTO> LayDSBanTheoThoiGianDat(string timetu, string timeden)
        {
            BanDAO ds = new BanDAO();
            List<BanDTO> kq = ds.LayDSBanTheoThoiGianDat(timetu, timeden);
            return kq;
        }
        public int ThemBan(BanDTO bn)
        {
            BanDAO bndao = new BanDAO();
            return bndao.ThemBan(bn);
        }
        public int XoaBan(string MaBn)
        {
            BanDAO bndao = new BanDAO();
            return bndao.XoaBan(MaBn);
        }
        public List<BanDTO> LayDanhSachBan()
        {
            BanDAO bndao = new BanDAO();
            return bndao.LayDanhSachBan();
        }
        public string LayMaBan(string khuvuc)
        {
            BanDAO bndao = new BanDAO();
            return bndao.LayMaBan(khuvuc);
        }
        public int KiemTraBan(string MaMN)
        {
            BanDAO bndao = new BanDAO();
            return bndao.KiemTraBan(MaMN);
        }
        public string TaoMa(string MaCuoi, string KhuVuc)
        {
            BanDAO bndao = new BanDAO();
            return bndao.TaoMa(MaCuoi, KhuVuc);
        }
        public int CapNhatBan(BanDTO bn)
        {
            BanDAO bndao = new BanDAO();
            return bndao.CapNhatBan(bn);
        }
        public string LayMaBanTuMaHD(int MaHD)
        {
            BanDAO bndao = new BanDAO();
            return bndao.LayMaBanTuMaHD(MaHD);
        }
        public List<BanDTO> LayBanTheoTrongNgayChuaThanhToan()
        {
            BanDAO bndao = new BanDAO();
            return bndao.LayBanTheoTrongNgayChuaThanhToan();
        }

        public List<BanDTO> dsban_new()
        {
            BanDAO ds = new BanDAO();
            List<BanDTO> kq = ds.dsban_new();
            return kq;
        }
        public List<BanDTO> dsban_khuvuc()
        {
            BanDAO ds = new BanDAO();
            List<BanDTO> kq = ds.dsban_khuvuc();
            return kq;
        }
    }
}
